PrizmDoc v12.0 - November 15, 2016
.NET WebForms Sample

Installation

  1. Prior to installation, ensure Microsoft's Internet Information Service (IIS) and ASP.NET 4.0+ are enabled on the computer that will be running the .NET Web Forms sample.
  2. Begin the installation of PrizmDoc for Windows.
  3. During the installation of PrizmDoc, make sure to select the following options:

 

  1. After the installation, test the sample application in a browser:

The following will route you directly to the Viewing Client sample splash page:

http://localhost:18000/PrizmDoc_HTML5_Viewer_NET_WEBFORMS/

  1. From the splash page you have two options:

Choice of Viewing Client:

Select a sample document -OR- upload a document:                                                    

  1. Full Viewer

If you select Full Viewer on the splash page, then documents will be viewed with the full-featured, out-of-the-box responsive Viewing Client:  

  1. Book Reader

If you select Book Reader on the splash page, then documents will be viewed with the book reader. The book reader demonstrates how the Viewing Client can be heavily customized:

Directory Structure

The samples are installed under C:\prizm\Samples\dotnet\webforms. This folder contains 6 sub-folders, one folder for each of the four samples (full Viewing Client, book reader, e-signer and the e-signer template designer) and two folders for the splash pages (main splash page and the e-sign splash page):

Each of the sample folders are completely self-contained, meaning that they contain all of the files needed to run the sample. Furthermore, with the exception of a few project files and build files, the sample folders contain only the files needed to run the sample.

Folder contents: full-viewer-sample

File / Folder

Description

App_Code folder

Contains classes that support the communication between the Viewing Client and PrizmDoc Application Services. While the code for the classes can be modified as needed, modifications should be done with care. See PrizmApplicationServices.cs to see how we integrate the sample with PrizmDoc Application Services and see PccConfig.cs to see how we load the pcc.config configuration file.

The files in this folder are essential and must be re-distributed to run the full Viewing Client.

viewer-assets folder

Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the Viewing Client.

viewer-assets/less folder

Contains less that can be used to build the Viewing Client CSS. This folder is non-essential, and does not need to be re-distributed.

viewer-assets/Gulpfile.js

Contains Gulp tasks to build the viewer less and icons. This file is non-essential and does not need to be re-distributed.

viewer-assets/package.json

A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Grunt and compile the less.This file is non-essential and does not need to be re-distributed.

viewer-webtier folder

Contains files that implement the ASP.NET layer of communication between the Viewing Client and the PrizmDoc Application Services.

viewer-webtier/pcc.ashx

This file handles all incoming requests from the Viewing Client. This file simply uses the App_Code/PrizmApplicationServices.cs class to forward all requests to PrizmDoc Application Services

viewer-webtier/pcc.config

Defines the connection settings for the PrizmDoc Application Services.

Default.aspx, Default.aspx.cs

The default page for the sample. This page loads the full Viewing Client.

web.config

Contains IIS settings.

predefinedSearch.json

This data file contains information defining search queries that will appear as selectable items in the full Viewing Client.

Note: This file is consumed by the page Default.aspx and the JSON is injected into the HTML that is returned by Default.aspx. Ultimately, the predefined search terms are provided as a JavaScript hash, when the Viewing Client is created.

redactionReason.json

This data file contains information defining redaction reasons that are available in the Viewing Client.

Note: This file is consumed by the page Default.aspx and the JSON is injected into the HTML that is returned by Default.aspx. Ultimately, the redaction reasons are provided as a JavaScript hash, when the Viewing Client is created.

Global.asax

The Global.asax file, also known as the ASP.NET application file, is a file that contains code for responding to application-level events raised by ASP.NET or by HttpModules. The Global.asax file resides in the root directory of an ASP.NET-based application. We use this file to initialize our PccConfig class.

full-viewer-sample.sln

Visual Studio solution file to open the sample.

 

Folder contents: book-reader-sample

File / Folder

Description

App_Code folder

Contains classes that support the communication between the Viewing Client and PrizmDoc Application Services. While the code for the classes can be modified as needed, modifications should be done with care. See PrizmApplicationServices.cs to see how we integrate the sample with PrizmDoc Application Services and see PccConfig.cs to see how we load the pcc.config configuration file.

The files in this folder are essential and must be re-distributed to run the full Viewing Client.

viewer-assets folder

Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the book reader Viewing Client.This file is non-essential and does not need to be re-distributed.

viewer-assets/less folder

Contains less that can be used to build the book reader CSS. This folder is non-essential, and does not need to be re-distributed.

viewer-assets/Gruntifle

Contains Grunt tasks to build the reader less. This file is non-essential and does not need to be re-distributed.

viewer-assets/package.json

A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Grunt and compile the less.

viewer-assets/selection.json

A file used by the IcoMoon application to generate the icons in the book reader Viewing Client.  If you need to add an icon to the Viewing Client, you can add the icon to this file and use the IcoMoon application (https://icomoon.io) to generate a new icon font. This file is non-essential and does not need to be re-distributed.

viewer-webtier folder

Contains files that implement the ASP.NET layer of communication between the Viewing Client and the PrizmDoc Application Services.

viewer-webtier/pcc.ashx

This file handles all incoming requests from the Viewing Client. This file simply uses the App_Code/PrizmApplicationServices.cs class to forward all requests to PrizmDoc Application Services

viewer-webtier/pcc.config

Defines the connection settings for the PrizmDoc Application Services.

index.html

The default page for the sample. This page calls the pcc.ashx handler to start a viewing session with the PrizmDoc Application Services and then the page loads the Viewing Client.

sample-config.js

Contains references to the assets, web tier, and language files used by the Viewing Client in this sample.

web.config

Contains IIS settings.

Global.asax

The Global.asax file, also known as the ASP.NET application file, is a file that contains code for responding to application-level events raised by ASP.NET or by HttpModules. The Global.asax file resides in the root directory of an ASP.NET-based application. We use this file to initialize our PccConfig class.

book-reader-sample.sln

Visual Studio solution file to open the sample.

Folder contents: e-signer-sample

File / Folder

Description

App_Code folder

Contains classes that support the communication between the Viewing Client and PrizmDoc Application Services. While the code for the classes can be modified as needed, modifications should be done with care. See PrizmApplicationServices.cs to see how we integrate the sample with PrizmDoc Application Services and see PccConfig.cs to see how we load the pcc.config configuration file.

The files in this folder are essential and must be re-distributed to run the full Viewing Client.

modules folder

Contains uncompiled assets of the Viewing Client. These files will be compiled to viewer-assets/js/bundle.js and viewer-assets/css/bundle.css by the build process defined in Gulpfile.js.

The files in this folder are  non-essential and do not need to be re-distributed.

viewer-assets folder

Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the Viewing Client.

Gulpfile.js

Contains Gulp tasks to build the viewer js and css files. This file is non-essential and does not need to be re-distributed.

viewer-assets/package.json

A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Gulp and compile the Viewing Client assets.This file is non-essential and does not need to be re-distributed.

viewer-webtier folder

Contains files that implement the ASP.NET layer of communication between the Viewing Client and the PrizmDoc Application Services.

viewer-webtier/pcc.ashx

This file handles all incoming requests from the Viewing Client. This file simply uses the App_Code/PrizmApplicationServices.cs class to forward all requests to PrizmDoc Application Services

viewer-webtier/pcc.config

Defines the connection settings for the PrizmDoc Application Services.

index.html

The default page for the sample. This page calls the pcc.ashx handler to start a viewing session with the PrizmDoc Application Services and then the page loads the Viewing Client.

web.config

Contains IIS settings.

webpack.config.js

Webpack configuration file. This file contains all the settings for the webpack module bundler. We use webpack to compile all the files in the modules folder to the bundle.js and bundle.css that are found in the viewer-assets folder.

Global.asax

The Global.asax file, also known as the ASP.NET application file, is a file that contains code for responding to application-level events raised by ASP.NET or by HttpModules. The Global.asax file resides in the root directory of an ASP.NET-based application. We use this file to initialize our PccConfig class.

e-signer-sample.sln

Visual Studio solution file to open the sample.

 

Folder contents: template-designer-sample

File / Folder

Description

App_Code folder

Contains classes that support the communication between the Viewing Client and PrizmDoc Application Services. While the code for the classes can be modified as needed, modifications should be done with care. See PrizmApplicationServices.cs to see how we integrate the sample with PrizmDoc Application Services and see PccConfig.cs to see how we load the pcc.config configuration file.

The files in this folder are essential and must be re-distributed to run the full Viewing Client.

modules folder

Contains uncompiled assets of the Viewing Client. These files will be compiled to viewer-assets/js/bundle.js and viewer-assets/css/bundle.css by the build process defined in Gulpfile.js.

The files in this folder are  non-essential and do not need to be re-distributed.

viewer-assets folder

Contains the essential JavaScript, CSS, fonts, images, language data, and templates (HTML) that make up the Viewing Client.

Gulpfile.js

Contains Gulp tasks to build the viewer js and css files. This file is non-essential and does not need to be re-distributed.

viewer-assets/package.json

A file used by npm (a package manager). It defines the dependencies installed by npm, which are required to run Gulp and compile the Viewing Client assets.This file is non-essential and does not need to be re-distributed.

viewer-webtier folder

Contains files that implement the ASP.NET layer of communication between the Viewing Client and the PrizmDoc Application Services.

viewer-webtier/pcc.ashx

This file handles all incoming requests from the Viewing Client. This file simply uses the App_Code/PrizmApplicationServices.cs class to forward all requests to PrizmDoc Application Services

viewer-webtier/pcc.config

Defines the connection settings for the PrizmDoc Application Services.

index.html

The default page for the sample. This page calls the pcc.ashx handler to start a viewing session with the PrizmDoc Application Services and then the page loads the Viewing Client.

web.config

Contains IIS settings.

webpack.config.js

Webpack configuration file. This file contains all the settings for the webpack module bundler. We use webpack to compile all the files in the modules folder to the bundle.js and bundle.css that are found in the viewer-assets folder.

Global.asax

The Global.asax file, also known as the ASP.NET application file, is a file that contains code for responding to application-level events raised by ASP.NET or by HttpModules. The Global.asax file resides in the root directory of an ASP.NET-based application. We use this file to initialize our PccConfig class.

template-designer-sample.sln

Visual Studio solution file to open the sample.

Configuration with pcc.config

The file pcc.config is used to configure the connection settings between the web tier and PrizmDoc Application Services. The file can be found at: <sample-folder-name>/viewer-webtier/pcc.config. This file is self-documenting, but a little information about the configuration options is given below.

<DocumentPath> (Only in splash pages)

The sample pulls named documents from this location. The DocumentPath must have read/write permissions in order for the file drag and drop functionality of the splash page to work.

<PrizmApplicationServices[Scheme|Host|Port]>

Specifies how to connect to the PrizmDoc Application Services

 

Development Information

The C# sample has the following requirements for development:

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback